@import './common/variables.scss';
@import './common/_transitions.scss';
@import './common/components.scss';
@import './common/layout.scss';

// 全局样式
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: $font-family;
  font-size: $font-size-base;
  color: $text-color-primary;
  background-color: $bg-color;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app {
  width: 100%;
  height: 100%;
}

a {
  text-decoration: none;
  color: $primary-color;
}

// 覆盖滚动条样式
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

// 工具类
.flex-center {
  @include flex-center;
}

.flex-between {
  @include flex-between;
}

.ellipsis {
  @include ellipsis;
}

.multi-ellipsis-2 {
  @include multi-ellipsis(2);
}

.pointer {
  cursor: pointer;
}

.full-size {
  width: 100%;
  height: 100%;
}

.text-left {
  text-align: left;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

// 边距类
@each $size, $value in (
  'sm': $spacing-sm,
  'md': $spacing-md,
  'lg': $spacing-lg,
  'xl': $spacing-xl
) {
  .mt-#{$size} {
    margin-top: $value;
  }
  .mr-#{$size} {
    margin-right: $value;
  }
  .mb-#{$size} {
    margin-bottom: $value;
  }
  .ml-#{$size} {
    margin-left: $value;
  }
  .pt-#{$size} {
    padding-top: $value;
  }
  .pr-#{$size} {
    padding-right: $value;
  }
  .pb-#{$size} {
    padding-bottom: $value;
  }
  .pl-#{$size} {
    padding-left: $value;
  }
} 